﻿//
// Created: 2018/9/2
// Author: chenqiang
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xproject.Framework.Core;
using System.ComponentModel.DataAnnotations.Schema;

namespace Model.WXshopBuiness
{
    public class  WeiXinOrder:IEntity
    {

        public string OrderName { get; set; }
        ///<summary>
        ///订单ID  guid 去除掉"-"
        ///<summary>
        public string OrderID  { get; set; } 
       ///<summary>
       /// 用户ID
       ///<summary>
       public string UserID  { get; set; }
        ///<summary>
        ///订单编号
        ///<summary>
        public string OrderCode  { get; set; } 
       ///<summary>
       /// 创建时间
       ///<summary>
       public DateTime CreateTime  { get; set; }

       public DateTime? UpdateTime { get; set; }
        
        ///<summary>
        ///订单金额
        ///<summary>
        public decimal OrderMoney  { get; set; }

        public decimal NeedToPay { get; set; }
        ///<summary>
        ///订单来源
        ///0：微信商城
        ///10：微信外卖
        ///20：微信堂食
        ///<summary>
        public int OrderSource  { get; set; }
        ///<summary>
        ///支付方式
        ///0：微支付
        ///5：微信扫码支付
        ///10：支付宝
        ///15：支付宝扫码支付
        ///20：银联支付         
        ///30：线下支付
        ///<summary>
        public int PayType  { get; set; }
        ///<summary>
        ///收货地址ID
        ///<summary>
        public string AddressID  { get; set; }
        ///<summary>
        ///订单状态
        ///0：购物车
        ///1：待支付
        ///5：已支付
        ///10：已发货
        ///15：已签收
        ///20：待评价
        ///30：已完成
        ///
        ///<summary>
        public int OrderState  { get; set; }
        ///<summary>
        ///备注
        ///<summary>
        public string Remark  { get; set; }
        ///<summary>
        ///确认支付时间
        ///<summary>
        public DateTime? ConfirmTime  { get; set; }
        ///<summary>
        ///确认支付状态
        ///<summary>
        public int ConfirmPayState  { get; set; }
        ///<summary>
        ///发货时间
        ///<summary>
        public DateTime? SendGoodsTime  { get; set; }
        ///<summary>
        ///发货人
        ///<summary>
        public string SendGoodsName  { get; set; }
        ///<summary>
        ///签收时间
        ///<summary>
        public DateTime? SignTime  { get; set; }
        ///<summary>
        ///联系人姓名
        ///<summary>
        public string UserName  { get; set; }
        ///<summary>
        ///联系人电话
        ///<summary>
        public string Mobile  { get; set; }
        ///<summary>
        ///区域代码
        ///<summary>
        public string AreaCode  { get; set; }
        ///<summary>
        ///区域
        ///<summary>
        public string Area  { get; set; }
        ///<summary>
        ///详细地址
        ///<summary>
        public string Detail  { get; set; } 
       ///<summary>
       ///快递商
       ///<summary>
       public string KDName  { get; set; } 
       ///<summary>
       ///快递单
       ///<summary>
       public string KDCode  { get; set; }
        ///<summary>
        ///快递费
        ///<summary>
        public decimal KDMoney  { get; set; }
        ///<summary>
        ///使用积分
        ///<summary>
        public decimal UseScore  { get; set; }
        ///<summary>
        ///使用现金
        ///<summary>
        public decimal UseCash  { get; set; }
        ///<summary>
        ///使用余额
        ///<summary>
        public decimal UseBalance  { get; set; }
        ///<summary>
        ///使用优惠券
        ///<summary>
        public decimal UseCoupon  { get; set; }
        ///<summary>
        ///订单类型
        ///<summary>
        public int OrderType  { get; set; }
        ///<summary>
        ///订单赠送礼品
        ///<summary>
        public string OrderGift  { get; set; }
        ///<summary>
        ///订单检查时间
        ///<summary>
        public DateTime? CheckTime  { get; set; }
        ///<summary>
        ///订单检查结果
        ///<summary>
        public string CheckResult  { get; set; }
        ///<summary>
        ///订单佣金金额
        ///<summary>
        public decimal OrderCommissionMoney  { get; set; }
        ///<summary>
        ///省份编码
        ///<summary>
        public string Province  { get; set; }
        ///<summary>
        ///市编码
        ///<summary>
        public string City  { get; set; }
        ///<summary>
        ///0：商家订单未结算，1：已结算
        ///<summary>
        public int IsSettlement  { get; set; } 
        ///<summary>
        ///系统平台 标识那个平台 暂未使用
        ///<summary>
       public int Platform  { get; set; } 
        /// <summary>
        /// 产品ID
        /// </summary>
       public string ProductId { get; set; }
        /// <summary>        
        /// 订单是否删除 1 已删除
        /// </summary>
        public int IsDel { get; set; }

        public string PromotionID { get; set; }

        /// <summary>
        /// 商品数目
        /// </summary>
        public int ProductNum { get; set; }
        public string ShopCarId { get; set; }
        /// <summary>
        /// 下单时的售价
        /// </summary>
        public decimal ThatTimeSalePrice { get; set; }
       [NotMapped]
        public long Id { get; set; }

        [NotMapped]
        public EntityState EntityState { get; set; }

        public int CompareTo(object obj)
        {
            throw new NotImplementedException();
        }
    }
}